import request from '@/utils/request'
// 	根据id获取数据 主表
export function TaskQueryInfoByID(id) {
  return request({
    url: 'Task/QueryInfoByID',
    method: 'GET',
    params: id
  })
}

// 	根据id获取数据 成果与限制时间
export function QueryDetailByTaskID(id) {
  return request({
    url: 'Task/QueryDetailByTaskID',
    method: 'GET',
    params: id
  })
}

// 	根据id删除数据 成果与限制时间
export function Deldetail(id) {
  return request({
    url: 'Task/Deldetail',
    method: 'GET',
    params: id
  })
}

// 保存
export function Save(data) {
  return request({
    url: 'Task/Save',
    method: 'POST',
    data: data
  })
}

// 	获取任务列表
export function QueryPageList(data) {
  return request({
    url: 'Task/QueryPageList',
    method: 'POST',
    data: data
  })
}


// 	根据id删除数据
export function Del(id) {
  return request({
    url: 'Task/Del',
    method: 'GET',
    params: id
  })
}
// 根据id获取任务列表
export function ProTaskList(data) {
  return request({
    url: 'Task/ProTaskListPer',
    method: 'POST',
    data: data
  })
}

// 	获取任务列表
export function QueryTaskStandList(data) {
  return request({
    url: 'Task/QueryTaskStandList',
    method: 'POST',
    data: data
  })
}

// 主任拆分保存
export function SplitSave(data) {
  return request({
    url: 'Task/SplitSave',
    method: 'POST',
    data: data
  })
}

// 主任拆分下发
export function SplitDown(id) {
  return request({
    url: 'Task/SplitDown',
    method: 'GET',
    params: id
  })
}

// 根据拆分id得数据
export function QuerySplitByID(id) {
  return request({
    url: 'Task/QuerySplitByID',
    method: 'GET',
    params: id
  })
}

// 填报保存
export function FillSavee(data) {
  return request({
    url: 'Task/FillSave',
    method: 'POST',
    data: data
  })
}

// 根据拆分id获得历史填报记录
export function QueryFillBySplitID(id) {
  return request({
    url: 'Task/QueryFillBySplitID',
    method: 'GET',
    params: id
  })
}


// 根据填报id获得数据
export function QueryFillByID(id) {
  return request({
    url: 'Task/QueryFillByID',
    method: 'GET',
    params: id
  })
}

export function upload(data) {
  return request({
    url: '/UpLoadFile/upload',
    method: 'POST',
    data: data,
    timeout: 3600000,
    headers: { repeatSubmit: false, 'Content-Type': 'multipart/form-data;' },
  })
}

export function uploadlist(data) {
  return request({
    url: 'UpLoadFile/list',
    method: 'POST',
    data: data
  })
}

export function FileDel(id) {
  return request({
    url: 'UpLoadFile/Del',
    method: 'GET',
    params: id
  })
}

export function getModelFile(id) {
  return request({
    url: 'InfoUpLoad/getModelFile',
    method: 'GET',
    params: id
  })
}

export function InfoUpLoad(data) {
  return request({
    url: 'InfoUpLoad/upload',
    method: 'POST',
    data: data,
    timeout: 3600000,
    headers: { repeatSubmit: false, 'Content-Type': 'multipart/form-data;' },
  })
}

// 填报保存
export function LedgerSave(data) {
  return request({
    url: 'Task/LedgerSave',
    method: 'POST',
    data: data
  })
}

export function QueryNewProByTaskID(data) {
  return request({
    url: 'Task/QueryNewProByTaskID',
    method: 'POST',
    data: data
  })
}


export function getTaskFillID() {
  return request({
    url: 'Task/getTaskFillID',
    method: 'GET',
  })
}
